home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Magazine / Online / QMail / source / ipmeprint.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-04-15  |  475 b   |  25 lines

  1. #include "subfd.h"
  2. #include "substdio.h"
  3. #include "ip.h"
  4. #include "ipme.h"
  5. #include "exit.h"
  6.  
  7. char temp[IPFMT];
  8.  
  9. void main()
  10. {
  11.  int j;
  12.  switch(ipme_init())
  13.   {
  14.    case 0: substdio_putsflush(subfderr,"out of memory\n"); _exit(111);
  15.    case -1: substdio_putsflush(subfderr,"hard error\n"); _exit(100);
  16.   }
  17.  for (j = 0;j < ipme.len;++j)
  18.   {
  19.    substdio_put(subfdout,temp,ip_fmt(temp,&ipme.ix[j].ip));
  20.    substdio_puts(subfdout,"\n");
  21.   }
  22.  substdio_flush(subfdout);
  23.  _exit(0);
  24. }
  25.